package gr.atc.epart.actions;

import gr.atc.epart.users.User;

import java.util.Date;

public class Survey extends Action
{
	private Date _startDate;
	
	private Date _stopDate;
	
	private boolean _isLoginRequired = true;
	
	// deliberation functionality is implemented using Google moderator
	// the link to moderator is the series id 
	private int _moderatorSeriesId;

	public Survey()
	{
		_popularity = _visits = 0;
		_type = Action.Type.Survey;
		
		_dateCreated = (new Date());
		_dateModified = null;
	}
	
	public Survey(String name, String description, User creator,
			Date startDate, Date stopDate)
	{
		_name = name;
		_description = description;
		_creator = creator;
		_startDate = startDate;
		_stopDate = stopDate;
		
		_popularity = _visits = 0;
		_type = Action.Type.Survey;
		
		_dateCreated = (new Date());
		_dateModified = null;

	}
	
	
	public Date getStartDate() 
	{
		return _startDate;
	}

	public void setStartDate(Date startDate) {
		_startDate = startDate;
	}

	public Date getStopDate() {
		return _stopDate;
	}

	public void setStopDate(Date stopDate) {
		_stopDate = stopDate;
	}

	public void setLogInRequired(boolean logInRequired) {
		_isLoginRequired = logInRequired;
	}

	public boolean isLogInRequired() {
		return _isLoginRequired;
	}

	public int getModeratorSeriesId()
	{
		return _moderatorSeriesId;
	}

	public void setModeratorSeriesId(int seriesId)
	{
		_moderatorSeriesId = seriesId;
	}
}
